<%@ page language="java" isELIgnored="false" import="java.util.*" pageEncoding="UTF-8" contentType="text/html; charset=UTF-8"%>
<%@ page import="com.kit.common.Context" %>
<%@ taglib prefix="s" uri="/struts-tags" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>用户信息管理</title>
<%@include file="/common/include.jsp"%>
<script type="text/javascript">
function loaduser(){
	
	$('#userForm').form('load', 'admin/userAction!viewUser.action?user.ids='+<%=Context.getCurrentUser().getIds()%>);
}
function saveUser(){
	//添加和修改保存
	$('#userForm').form('submit',{
        onSubmit: function(){     	
        	return $('#userForm').form('validate');
        },
        success:function(data){
        	eval('data='+data);
        	var state = data.state;
        	var retMsg = data.resultMsg;
        	$.messager.alert('提示信息','<div style="padding-top:15px;padding-left:5px"><b>'+retMsg+'</b></div>','info');
        	loaduser();
        }
	});
}
function SpecCHK(obj){
	if(obj.checked){
		$('#SpecField').css({'border':'1px solid #B5B8C8;'});
		$('#SpecInfo').show();
	}else{
		$('#SpecField').css({'border':'0px solid #B5B8C8;'});
		$('#SpecInfo').hide();
	}		
}
</script>
</head>
<body class="easyui-layout" onload="loaduser();">
<form id="userForm" method="post" action="admin/userAction!saveUser.action">
	  <fieldset> 
        <legend style="padding:5px 3px 3px 3px">用户基本信息</legend> 
	    <table border="0" cellspacing="3px">
	        <tr>
	        <td style="padding-left:6px;width:18%">用户名：</td>
	            <td><input class="easyui-validatebox" type="text" name="names" style="width:154px;" required="true"/></td>
	            <td style="padding-left:6px;width:18%">航空公司：</td>
	            <td>
	                <input type="hidden" id="ids" name="ids"/>
                    <input type="hidden" name="valid"/>
                    <input type="hidden" name="userInfoIds"/>
                    <input type="hidden" name="userName" />
                    <input type="hidden" name="userClass" />
	            	<select name="departmentIds" class="easyui-combotree" url="admin/commAction!getDepartmentTreeJSON.action" valueField="id" textField="text" required="true" style="width:160px;"></select>
	            </td>
	            
	        </tr>
	        
	         <tr>
	         	<td style="padding-left:6px;width:18%">职务：</td>
	            <td><select name="postion" class="easyui-combotree" url="admin/commAction!dictTreeJSON.action?codes=postion" valueField="id" textField="text" style="width:160px;"></select></td>
	            <td style="padding-left:6px;width:18%">性别：</td>
	            <td><select name="sex" class="easyui-combotree" url="admin/commAction!dictTreeJSON.action?codes=sex" valueField="id" textField="text"  required="true" style="width:160px;"></select></td>
	        </tr>
		    <tr>
	            <td style="padding-left:6px;width:18%">手机号：</td>
	            <td><input class="easyui-validatebox" type="text" style="width:154px;" name="mobile" validType="mobile"/></td>
	            <td style="padding-left:6px;width:18%">电话：</td>
	            <td><input class="easyui-validatebox" type="text" style="width:154px;" name="telephone"/></td>
	        </tr> 
	        <tr>
	            <td style="padding-left:6px;width:18%">QQ号码：</td>
	            <td><input class="easyui-validatebox" style="width:154px;" type="text" name="qq" validType="QQ"/></td>
	            
	        
	            <td style="padding-left:6px;width:18%">邮箱：</td>
	            <td><input class="easyui-validatebox" type="text" style="width:154px;" validType="email" name="email" required="true"/>
	            （用于接收预警邮件）
	            </td>
	            <td style="padding-left:6px;width:18%"></td>
	            <td></td>
	        </tr>
	        <tr>
	            <td style="padding-left:6px">地址：</td>
	            <td colspan="3"><textarea cols="43" rows="2" type="text" name="address"></textarea></td>
	        </tr> 
		</table>
	   </fieldset>
	   <fieldset id="SpecField" style="border:0px solid #B5B8C8;"> 
        <legend style="padding:5px 3px 3px 3px;">
        	<table border="0" cellspacing="0" cellpadding="0">
		   	 <tr>
		         <!-- <td><input type="checkbox" id="CHK" onclick="SpecCHK(this)"/></td><td style="padding-top:5px">详细资料</td> -->
		     </tr>
		   </table>
        </legend> 
	    <table border="0" id="SpecInfo" style="display: none" cellspacing="3px">        
	        <tr>
	            <td style="padding-left:6px;width:18%">身份证:</td>
	            <td><input class="easyui-validatebox" style="width:154px;" type="text" validType="idcard" name="idCard"/></td>
	            <td style="padding-left:6px;width:18%">生日:</td>
	            <td><input class="easyui-datebox" type="text" style="width:160px;" name="birthday" validType="strDate"/></td>
	        </tr>       
	        <tr>
	            <td style="padding-left:6px;width:18%">民族:</td>
	            <td><select name="folk" class="easyui-combotree" url="admin/commAction!dictTreeJSON.action?codes=folk" valueField="id" textField="text"  style="width:160px;"></td>
	            <td style="padding-left:6px;width:18%">婚姻状况:</td>
	             <td><select name="marriage" class="easyui-combotree" url="admin/commAction!dictTreeJSON.action?codes=marriage" valueField="id" textField="text"  style="width:160px;"></td>
	        </tr>
            <tr>
	            <td style="padding-left:6px;width:18%">政治面貌:</td>
	            <td><select name="government" class="easyui-combotree" url="admin/commAction!dictTreeJSON.action?codes=government" valueField="id" textField="text"  style="width:160px;"></td>
	            <td style="padding-left:6px;width:18%">身高(cm):</td>
	            <td><input class="easyui-numberbox" style="width:154px;" type="text" name="stature"/></td>
	        </tr>    	       
            <tr>
	            <td style="padding-left:6px;width:18%">体重(kg):</td>
	            <td><input class="easyui-numberbox" style="width:154px;" type="text" name="avoirdupois"/></td>
	            <td style="padding-left:6px;width:18%">血型:</td>
	            <td><select name="bloodGroup" class="easyui-combotree" url="admin/commAction!dictTreeJSON.action?codes=bloodGroup" valueField="id" textField="text"  style="width:160px;"></td>
	        </tr> 
            <tr>
	            <td style="padding-left:6px;width:18%">出生地:</td>
	            <td><input class="easyui-validatebox" style="width:154px;" type="text" name="nativityAddress"/></td>
	            <td style="padding-left:6px;width:18%">户口所在地:</td>
	            <td><input class="easyui-validatebox" style="width:154px;" type="text" name="householder"/></td>
	        </tr> 
			 <tr>
	            <td style="padding-left:6px;width:18%">文化程度:</td>
	            <td><select name="culture" class="easyui-combotree" url="admin/commAction!dictTreeJSON.action?codes=culture" valueField="id" textField="text"  style="width:160px;"></td>
				<td style="padding-left:6px;width:18%">专业:</td>
	            <td><select name="speciality" class="easyui-combotree" url="admin/commAction!dictTreeJSON.action?codes=speciality" valueField="id" textField="text"  style="width:160px;"></td>
	        </tr> 

            <tr>
	            <td style="padding-left:6px;width:18%">毕业院校:</td>
	            <td><input class="easyui-validatebox" style="width:154px;" type="text" name="schoolName"/></td>
				<td style="padding-left:6px;width:18%">毕业时间:</td>
	            <td colspan="3"><input class="easyui-datebox" style="width:160px;" type="text" name="finishSchoolDate" validType="strDate"/></td>
	        </tr> 
	       <tr>
	            <td style="padding-left:6px;width:18%">其它说明:</td>
	            <td colspan="3"><textarea type="text" name="description" cols="43" rows="6"></textarea></td>
	        </tr> 
	     </table>
	     </fieldset> 
       </form>
       <div region="south" border="false" style="text-align:right;height:30px;line-height:30px;">
     	<a class="easyui-linkbutton" icon="icon-save" href="javascript:void(0)" onclick="saveUser()">保存</a>
     </div>
</body>
</html>